package com.jzit168.library_base.baseVM

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.jzit168.library_base.base.BaseFragment

/**
 *@Desc: 携带创建ViewModel的基类Fragment
 *@Author: Android Developer
 *@Date: 2020/10/15
 *
 **/
abstract class BaseVMFragment<VM : ViewModel> : BaseFragment() {

    open val viewModel by lazy { ViewModelProvider(this)[getViewModel()] }

    abstract fun getViewModel(): Class<VM>

}